import request from '@/utils/request'

export default {

    //带条件的分页查询
    getRoomPageVo(current, limit, roomQuery) {
        return request({
            url: `/inner/room/getRoomPageVo/${current}/${limit}`,
            method: 'post',
            data: roomQuery //转化json传递
        })
    },
    //根据删除讲师
    delRoomById(id) {
        return request({
            url: `/inner/room/delRoomById/${id}`,
            method: 'delete',
        })
    },
    //上传照片
       //根据删除讲师
       fileUploads(id,files) {
        return request({
            url: `/travel/fileUploads/${id}`,
            method: 'post',
            data : files
        })
    },
    //新增讲师
    addRoom(room){
        return request({
            url: `/inner/room/addRoom/`,
            method: 'post',
            data: room   //转化json传递
        })
    },
    //根据id查询数据，做回显
    getRoomById(id){
        return request({
            url: `/inner/room/getRoomById/${id}`,
            method: 'get'
          })
    },
    //执行修改操作
    updateRoom(room){
        return request({
            url: `/inner/room/updateRoom`,
            method: 'post',
            data: room   //转化json传递
        })
    },
}